<template>
  <div class="el-upload-box">
    <el-upload
      ref="upload"
      class="avatar-uploader"
      :accept="config.accept"
      :name="config.name"
      :auto-upload="config.autoupload"
      :action="config.action"
      :show-file-list="false"
      :before-upload="beforeAvatarUpload"
      :on-success="handleAvatarSuccess"
    >
      <img v-if="imageUrl" :src="imageUrl" class="avatar" />
      <i v-else class="el-icon-plus avatar-uploader-icon"></i>
    </el-upload>
  </div>
</template>
<script src="./index.js"></script>
<style lang="scss" src="./index.scss"></style>
